<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>手机商城</title>
<!-- CSS -->
<!--<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">-->
<link rel="stylesheet" href="{url:#css/materialize.min.css}" />
<link rel="stylesheet" href="{url:#css/me.css}" />
<link rel="stylesheet" href="{url:#css/iconfont.css}" />
<style type="text/css">
a{
	color:black;
}
/**去除绿色下划线 - 开始*/
input::-webkit-input-placeholder {
    color: #7e7e7e;
    text-indent: 5px;
}
input:not([type]),input[type=text],input[type=password],input[type=email],input[type=url],input[type=time],input[type=date],input[type=datetime-local],input[type=tel],input[type=number],input[type=search],textarea.materialize-textarea{background-color:transparent;border:none;border-radius:0;outline:none;height:1.5em;width:100%;font-size:1rem;margin:0;padding:0;box-shadow:none;}
input:not([type]):focus:not([readonly]),input[type=text]:focus:not([readonly]),input[type=password]:focus:not([readonly]),input[type=email]:focus:not([readonly]),input[type=url]:focus:not([readonly]),input[type=time]:focus:not([readonly]),input[type=date]:focus:not([readonly]),input[type=datetime-local]:focus:not([readonly]),input[type=tel]:focus:not([readonly]),input[type=number]:focus:not([readonly]),input[type=search]:focus:not([readonly]),textarea.materialize-textarea:focus:not([readonly]){border-bottom:1px solid #ffffff;box-shadow:none}
/**去除绿色下划线 - 结束*/
</style>

<!-- JS -->
<script src="{url:#js/jquery-1.11.3.min.js}"></script>
<script src="{url:#js/materialize.min.js}"></script>
<script src="{url:#js/home/search_page.js}"></script>
</head>
<body>

<!-- TitleBar 开始 -->
<div class="navbar-fixed custom-navbar">
  <nav>
    <div class="nav-wrapper red accent-4 valign-wrapper custom-navbar">
      <ul class="left" id="nav-btn-left" onclick="window.history.go(-1)">
        <li><a ><i class="iconfont">&#xe63c;</i></a></li>
      </ul>
      <div style="width:100%;"><input id="search_text" type="text" value="{$search_text|''}" style="font-weight:bold" placeholder='请在此处输入商品名称'/></div>
      <ul class="right">
        <li><a href="javascript:;" onclick="check_sub()"><i class="material-icons">search</i></a></li>
      </ul>
    </div>
  </nav>
</div>
<!-- TitleBar 结束 -->

<script type="text/javascript">
function check_sub()
{
	var t = $("#search_text").val();
	document.location.href="{url:/mobile/search_products/search_text/}"+t;
}
</script>

<!-- 商品排序头部 -->
<div class="sort-header">
 <div class="row mgr-0 padd-0">
 <!-- 
	<div class="col s4 center element selected">
		评论优先<i class="iconfont" style="font-size:1.2em;">&#xe667;</i>
	</div>
	-->
	<div class="col s6 center element" name='div_order' onclick="clc(1)">
		销量优先<i class="iconfont" style="font-size:1.2em;">&#xe667;</i>
	</div>
	<div class="col s6 center element" name='div_order' onclick="clc(2)">
		价格优先<i class="iconfont" style="font-size:1.2em;">&#xe667;</i>
	</div>
 </div>		
 <div class="divider"></div>		
</div>
<!-- 排序头部结束 -->

<!-- 商品列表 -->
<div class="product_list">
	<ul class="mgr-0 padd-0">
		{list:items=$goods_list}
		<li><a href="{url:/mobile/product_detail/id/$item[id]}">
			<div>
				<!-- 商品图片 -->
				<div class="left-align pro-img">
					<img src="{$item['img']}" width="95px" height="95px"/>
				</div>
				
				<!-- 商品详情 -->
				<div class="pro-info">
					<p>{$item['name']}</p>
					<span style="color:#FF0000; font-weight:500; font-size:1.1em;">￥{$item['sell_price']}</span>
					<span style="color:#999999; margin-left:10px;"><s>￥{$item['market_price']}</s></span>
					<br />
					<!-- 
					<span style="font-size:0.85em;">好评率100%&nbsp;&nbsp;&nbsp;&nbsp;2456人</span>
					-->
					<span style="font-size:0.85em;">销量&nbsp;&nbsp;&nbsp;&nbsp;{echo:Common::getGoodNumByGId($item[id])|'0'}</span>
				</div>
			</div>
			</a>
		</li>
		<li class="dividerli">
			<div class="divider"></div>
		</li>
		{/list}
		
	</ul>
</div>
<!-- 列表结束 -->
<script type="text/javascript">
function clc(type)
{
	var search_text = $("#search_text").val();
	document.location.href="{url:/mobile/search_products}&type="+type+"&search_text="+search_text;
}
/*
$(function(){
	
	
		
			$("div[name='div_order']").each(function(){
				$(this).click(function(){
					var search_text = $("#search_text").val();
					var t_css = $(this).attr('class');
					if(t_css == 'col s6 center element')
					{
						$(this).attr('class', 'col s6 center element selected');
						document.location.href="{url:/mobile/search_products/type/1/search_text/}"+search_text;
					}
					else
					{
						$(this).attr('class', 'col s6 center element');
						document.location.href="{url:/mobile/search_products/type/2/search_text/}"+search_text;
					}
					
					
				});
			});
			
		
	
});
*/
</script>
</body>
</html>
